#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time      :2021/7/16 13:39
# @Author    :cjw
from sqlalchemy.orm import Session
from app.db.session import SessionLocal


def get_db():
	"""生成数据库连接"""
	db: Session = SessionLocal()
	try:
		yield db
	finally:
		db.close()
